home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: in1.uu.net!shore!mv!usenet
- From: ENGR@GSSI.MV.COM (Michael Furman)
- Subject: Re: Preprocessor derectives is insufficient for me
- Message-ID: <DpCEpL.Dtv@mv.mv.com>
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- Organization: GSSI
- Date: Thu, 4 Apr 1996 14:53:44 GMT
- References: <ABY08OnW53@npn-price.pskov.su>
- X-Newsreader: WinVN 0.99.7
- X-Nntp-Posting-Host: gssi.mv.com
-
- In article <ABY08OnW53@npn-price.pskov.su>, ivl@npn-price.pskov.su says...
- >
- >Hello all!
- >
- >Just look at this code
- >
- >#define DECLARE_CLASS(first_class,second_class,name_class) \
- >class name_class : virtual public first_class , virtual public second_class
-
- >\
- >{ \
- >public: \
- > name_class(); \
- > ~name_class(); \
- >public: \
- > virtual base* operator&(classA&) \
- > virtual base* operator&(classB&) \
- >
- > . . .
- >
- > virtual base* operators&(classN&) \
- >};
- >
- >I have to filter some operations I don't need in specific name_class.
- >But a compiler don't allow to use #if in another #define statement :(
- >
- >May be there is a way to solve my problem ?
-
- You want to generate some C++ code automatically. C/C++ preprocessor
- was not designed for this kind of work. I would recommend you use some
- universal macroprocessor or just make your own generator.
-
- --
- <<< If you received it by E-mail: it is a copy of post to the newsgroup >>>
- ---------------------------------------------------------------
- Michael Furman, (603)893-1109
- Geophysical Survey Systems, Inc. fax:(603)889-3984
- 13 Klein Drive - P.O. Box 97 engr@gssi.mv.com
- North Salem, NH 03073-0097 71543.1334@compuserve.com
- ---------------------------------------------------------------
-
-